import pytest
import os


# 默认单进程执行用例
def run(num_of_process: int = 1):
    pytest.main(['-s', '-W', 'ignore:Module already imported:pytest.PytestWarning', f'-n={num_of_process}',
                 '--alluredir', './report/tmp', "--clean-alluredir"])
    os.system(r"allure generate ./report/tmp -o ./report/html --clean")


if __name__ == '__main__':
    run()
